home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-30 | 30.3 KB | 1,228 lines | [TEXT/McSk] |
- // "myCShell(SARez).r"
- // -- the Resources for "CAppl"
- //
- // -- using "SARez" { v 3.2 }
-
-
-
- // The new "Types.r" resource description file for System 7
- // adds an unsigned integer field to each of the following.
- // The added field pertains to window positioning:
- //
- // type 'ALRT'
- // type 'DLOG'
- // type 'WIND'
- //
- // For all these resources I let System 7 handle window
- // positioning by specifying "centerMainScreen".
- // For System 6 and earlier, my C source code handles it.
- //
- // Note that my application is definitely "System 7 friendly".
- // Not only does it work, but it takes advantage of some of
- // the Help Manager features, in particular:
- // Balloon Help &
- // AppleEvents
-
- #define SystemSevenOrLater true
- #define oldTemp true /* "Somin" so I do NOT have to specify */
- /* 0x0, { wCSeed } */
- /* 0, { wCReserved } */
- /* for every Color Table */
- /* ... but I wanna !!! So sue me !!! */
-
- #ifndef _TYPES_
- #include "Types.r"
- #endif
-
- #ifndef _MACAPPTYPES_
- #include "MacAppTypes.r" /* "cmnu" */
- #endif
-
- #ifndef _BALLOONTYPES.R_
- #include "BalloonTypes.r"
- #endif
-
- /* ----- my stuff ... ----- */
-
- include "System 7";
- include "MoofSND";
- include "ZoomSNDs";
-
- include "HTBL_TEXT_Topic_Info";
- include "HTBL_PICTs"; // Contains the following:
- // ID = 3000 ( Color Mac = HTBL_Pict )
- // ID = 3001 ( IACS Logo )
- // ID = 3002 ( WAP Initials )
- // ID = 3003 ( Monster = Err_PICT )
- // ID = 3004 ( PICT in Floating Window )
-
- include "Floating Hand (color)"; // CuRSoR for Floating HELP Window, ID = 3004
- include "Floating Hand (BW)"; // ... and its equivalent CURSor for "yucky" Macs.
- include "Bill (B&W)"; /* Help Manager has problems with PICTs */
- /* in 'hfdr' resource that do NOT have */
- /* a rect whose topLeft = (0, 0). */
-
- include "ictb";
-
-
-
- /* ----- Constants ----- */
-
- #define kMainWindowID kDefaultWindowID /* = 1001 */
- #define kNewWindowID kMainWindowID + 1
- #define kHorizScrollBarID 128
- #define kVertScrollBarID 129
- #define mySicnRsrc 300 /* rsrc ID */
- #define mySicn mySicnRsrc - 256 /* Item Icon's # */
- #define myIconRsrc 400 /* rsrc ID */
- #define myIcon myIconRsrc - 256 /* Item Icon's # */
- #define kVersID 0 /* Finder stuff ... */
- #define kTopStringID 2
- #define kBottomStringID 1
- #define kLocalID 0
- #define kBNDL_ID 128
- #define kFREF_ID 128
- #define kICN_ID 128
- //
- #define kBragWindowID 999
- #define kSystem7 777 /* ID of "System 7" PICT */
- //
- #define HTBL_RSRC 128
- #define MAX_TOPICS 50
- #define Help_Window 300
- #define Help_Error 301
- // PICTs in "HTBL PICTs":
- // width, height in pixels:
- #define MAC 3000 // 64, 48
- #define IACS 3001 // 375, 105
- #define WAP 3002 // 160, 149
- #define MONSTER 3003 // 134, 158
- #define FLOAT 3004 // 72, 70
-
-
-
- type 'JAL3' { /* TYPE = Signature */
- pstring;
- };
-
- /* ---------- */
-
- type 'vers' {
- byte defaultVersion = 1; /* version */
- byte defaultRevision = 5; /* revision */
- byte defaultRevStage = 128; /* revStage */
- byte defaultBuildNbr = 2; /* buildNbr */
- integer defaultLang = 0; /* languageInt */
- pstring; /* abbreviated string */
- align word;
- pstring;
- };
-
- /////////////////////
-
- resource 'JAL3' (kVersID, "Version", purgeable) {
- "My CShell {v 1.Ø}"
- };
-
- resource 'BNDL' (kBNDL_ID, purgeable) {
- 'JAL3', /* Signature */
- kVersID,
- {
- 'FREF',
- {
- kLocalID, kICN_ID; /* Local, Actual ID(s) */
- };
-
- 'ICN#',
- {
- kLocalID, kICN_ID;
- };
- };
- };
-
- resource 'FREF' (kFREF_ID, "Application", purgeable) {
- 'APPL',
- kLocalID,
- "my CShell DEMO"
- };
-
- resource 'ICN#' (kICN_ID, "IACS", purgeable) {
- { /* Data */
- $"00000000 00000000 6040FC7E 60E0FC7E"
- $"61B0C060 6318C060 6318C060 6318C060"
- $"6318C060 6318C060 6318C060 6318C060"
- $"63F8C07E 63F8C07E 6318C006 6318C006"
- $"6318C006 6318C006 6318C006 6318C006"
- $"6318C006 6318C006 6318C006 6318FC7E"
- $"6318FC7E 00000000 00000000 00000000"
- $"7FFFFFFE 7FFFFFFE 00000000 00000000";
-
- /* Mask */
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF"
- $"FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF";
- };
- };
-
- resource 'vers' (kTopStringID, purgeable) {
- defaultVersion,
- defaultRevision,
- defaultRevStage,
- defaultBuildNbr,
- defaultLang,
- "©91",
- "©1991 I•A•C•S Software"
- };
-
- resource 'vers' (kBottomStringID, purgeable) {
- defaultVersion, defaultRevision, defaultRevStage,defaultBuildNbr, defaultLang,
- "1.Ø",
- "1.Ø ... in color too, folks !!"
- };
-
- resource 'SIZE' (-1, purgeable) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- multiFinderAware,
- backgroundAndForeground,
- dontGetFrontClicks, /* ... when suspended */
- ignoreChildDiedEvents,
- not32BitCompatible,
- isHighLevelEventAware,
- onlyLocalHLEvents,
- notStationeryAware,
- dontUseTextEditServices,
- reserved,
- reserved,
- reserved,
- 384*1024,
- 224*1024
- };
-
- /////////////////////
-
- resource 'cmnu' (mApple) {
- mApple,
- textMenuProc,
- 0x7FFFFFFD,
- enabled,
- apple,
- {
- /* [ 1] */ "About my application ...",
- mySicn, "\0x1E", noMark, plain, cAboutApp;
- /* [ 2] */ "-", noIcon, noKey, noMark, plain, noCommand;
- }
- };
-
- /* ----- */
-
- resource 'cmnu' (mFile) {
- mFile,
- textMenuProc,
- 0x7FFFFFFB,
- enabled,
- "File",
- {
- /* [ 1] */ "Quit", myIcon, "Q", noMark, italic, cQuit;
- }
- };
-
- /* ----- */
-
- resource 'cmnu' (mEdit) {
- mEdit,
- textMenuProc,
- 0x7FFFFFFD,
- enabled,
- "Edit",
- {
- /* [ 1] */ "Undo", noIcon, "Z", noMark, plain, cUndo;
- /* [ 2] */ "-", noIcon, noKey, noMark, plain, noCommand;
- /* [ 3] */ "Cut", noIcon, "X", noMark, plain, cCut;
- /* [ 4] */ "Copy", noIcon, "C", noMark, plain, cCopy;
- /* [ 5] */ "Paste", noIcon, "V", noMark, plain, cPaste;
- /* [ 6] */ "Clear", noIcon, noKey, noMark, plain, cClear;
- }
- };
-
- /* ----- */
-
- resource 'MBAR' (kMBarDisplayed) { {mApple, mFile, mEdit} };
-
- /////////////////////
-
- resource 'mctb' (mApple) {
-
- {
- // MenuBar entry:
-
- 0, /* mctID for the MenuBar. */
- 0, /* mctItem for the MenuBar. */
- {
- 0, 30000, 0; /* mctRGB1 = dflt color for title (med green). */
- 57344, 57344, 57344; /* mctRGB2 = dflt color for background */
- /* of pulled-down Menu (lt gray). */
- 0, 0, 65535; /* mctRGB3 = dflt color for items (blue). */
- 64512, 62333, 1327; /* mctRGB4 = color of MenuBar (yellow). */
- };
-
- // Different-from-normal title & item entries may follow here.
- // Otherwise, the MenuBar entry above takes care of them all.
-
- /*++++++++*/
-
- mctbLast, /* last entry marker (ID = -99) ... */
- 0,
- {
- 0, 0, 0;
- 0, 0, 0;
- 0, 0, 0;
- 0, 0, 0;
- }; /* End of last element in MCTBArray */
- }; /* End of MCTBArray */
- }; /* End of resource */
-
- /* ----- */
-
- resource 'mctb' (mFile) {
-
- {
- 0,
- 0,
- {
- 0, 30000, 0;
- 57344, 57344, 57344;
- 0, 0, 65535;
- 64512, 62333, 1327;
- };
-
- /*++++++++*/
-
- mctbLast,
- 0,
- {
- 0, 0, 0;
- 0, 0, 0;
- 0, 0, 0;
- 0, 0, 0;
- };
- };
- };
-
- /* ----- */
-
- resource 'mctb' (mEdit) {
-
- {
- 0,
- 0,
- {
- 0, 30000, 0;
- 57344, 57344, 57344;
- 0, 0, 65535;
- 64512, 62333, 1327;
- };
-
- /*++++++++*/
-
- mctbLast,
- 0,
- {
- 0, 0, 0;
- 0, 0, 0;
- 0, 0, 0;
- 0, 0, 0;
- };
- };
- };
-
- /////////////////////
-
- resource 'WIND' (kMainWindowID, "the Main Window", purgeable) {
- {30, 40, 280, 390},
- rDocProc,
- invisible,
- goAway,
- 0x0, /* refCon */
- "my CShell Demo",
- centerMainScreen
- };
-
- /*--------*/
-
- resource 'wctb' (kMainWindowID, "the Main Window", nonpurgeable) {
- 0x0, // wCSeed
- 0, // wCReserved
- {
- // Text color = color of window's title.
- // Hilite color = color of horizontal lines, close box and
- // grow box in title bar.
- // Color of title bar = color around horizontal lines and
- // the two boxes in the title bar.
- //
- // Howsomever, rDocProc is a special case:
- //
- // a) text color = content color.
- // b) hilite color must ALWAYS be white.
- // c) color of title bar = frame color.
- //
- // Please note that these ColorSpecs for wTextColor,
- // wHiliteColor and wTitleBarColor are commented out because
- // Mommy ROM takes care of the above conversions !!
-
- wContentColor, 65535, 65535, 65535; /* white */
- wFrameColor, 65535, 0, 0; /* red */
- // wTextColor, 65535, 65535, 65535; /* white */
- // wHiliteColor, 65535, 65535, 65535; /* white */
- // wTitleBarColor, 65535, 0, 0; /* red */
- }
- };
-
- //////////
-
- resource 'CNTL' (kHorizScrollBarID, "horizontal", purgeable) {
- {284, 0, 300, 385}, // 300-scrollHeight,0,300,400-growBoxSize
- // ( Resized by program. )
- 0, // Initial value
- invisible,
- 1, // Maximum value (normally set by the program)
- 0, // Minimum value
- scrollBarProc,
- 128, // User-defined value for refCon.
- "" // no title
- };
-
- /*--------*/
-
- resource 'cctb' (kHorizScrollBarID, "horizontal", purgeable) {
- 0x0, // ccSeed
- 0, // ccReserved
- {
- //
- // Frame color = also, the foreground/body color for highlighted Arrows.
- // Body color = also, the shaft's color for a de-activated control.
- // Text color = unused for a Scroll Bar.
- // Thumb color = its fill color.
- //
- cFrameColor, 65535, 0, 0; /* red */
- cBodyColor, 65535, 65535, 65535; /* white */
- cTextColor, 0, 0, 0; /* black */
- cElevatorColor, 0, 0, 65535; /* blue */
- };
- };
-
- //////////
-
- resource 'CNTL' (kVertScrollBarID, "vertical", purgeable) {
- {0, 384, 285, 400}, // 0,400-scrollWidth,300-growBoxSize,400
- // ( Resized by program. )
- 0, invisible, 1, 0, scrollBarProc, 129, ""
- };
-
- /*--------*/
-
- resource 'cctb' (kVertScrollBarID, "vertical", purgeable) {
- 0x0,
- 0,
- {
- cFrameColor, 65535, 0, 0;
- cBodyColor, 65535, 65535, 65535;
- cTextColor, 0, 0, 0;
- cElevatorColor, 0, 0, 65535;
- };
- };
-
- /////////////////////
-
- resource 'WIND' (kSystem7, "System 7", purgeable) {
- {91, 206, 251, 306},
- plainDBox,
- visible,
- nogoAway,
- 0x0,
- "",
- centerMainScreen
- };
-
- include "Windoid"; // Special WDEF for Floating Windows.
- #define Windoid 104
- /* ----- */
- resource 'WIND' (FLOAT, "Floating HELP Window", purgeable) {
- {40, 40, 110, 112},
- 1668, // = 16*Windoid + noGrowDocProc
- invisible,
- nogoAway,
- 0x0,
- "",
- noAutoCenter
- };
-
- /* ... just for testing DisplayWindow(): */
- type 'WIND' {
- rect; /* boundsRect */
- integer documentProc, /* procID */
- dBoxProc,
- plainDBox,
- altDBoxProc,
- noGrowDocProc,
- movableDBoxProc,
- zoomDocProc = 8,
- zoomNoGrow = 12,
- rDocProc = 16;
- byte invisible, visible; /* visible */
- fill byte;
- byte noGoAway, goAway; /* goAway */
- fill byte;
- unsigned hex longint; /* refCon */
- pstring Untitled = "Untitled"; /* title */
- };
-
- resource 'WIND' (kBragWindowID, "Brag", purgeable) {
- {60, 40, 165, 415}, // Holds the "IACS" PICT.
- altDBoxProc,
- invisible,
- nogoAway,
- 0x0, /* Refcon */
- "" /* NO title for this type */
- // centerMainScreen
- };
-
- /////////////////////
-
- resource 'ALRT' (777, "AppleEvents", purgeable) {
-
- {50, 50, 50+120, 50+288},
- 777, /* ID of corresponding DITL. */
- {
- OK, visible, sound1; /* Stage #4 */
- OK, visible, sound1; /* Stage #3 */
- OK, visible, sound1; /* Stage #2 */
- OK, visible, sound1 /* Stage #1 */
- },
- centerMainScreen
-
- };
-
- resource 'DITL' (777, "AppleEvents", purgeable) {
-
- {
- /* {10, 20, 42, 52}, Icon { disabled, noteIconID=1}; */
- {90, 110, 110, 168}, Button { enabled, "OK"};
- {10, 72, 30, 268}, StaticText { disabled, "^0"};
- {30, 72, 50, 268}, StaticText { disabled, "^1"};
- {50, 72, 70, 268}, StaticText { disabled, "^2"};
- };
-
- };
-
- /////////////////////
-
- resource 'cicn' (myIconRsrc, "Face", purgeable) {
- // *
- // ********** IconPMap **********
- // *
- // $00000000 /* fill long = pBaseAddr */
- // unsigned bitstring[1] = 1 pRowBytes = $8000 +
- // unsigned bitstring[2] = 0
- $0010, /* pMapRowBytes = pixelSize * rowBytes(4) */
- { 0, 0, 32, 32 }, /* bounds */
- 0, /* pmVersion */
- 0, /* packType */
- 0, /* packSize */
- $00480000, /* hRes */
- $00480000, /* vRes */
- chunky, /* pixelType */
- 4, /* pixelSize */
- 1, /* cmpCount */
- 4, /* cmpSize = pixelSize */
- 0, /* planeBytes */
- 0, /* pmTable */
- // 00000000 /* fill long = pmReserved */
- // *
- // ********** IconMask **********
- // *
- // 00000000 /* fill long = mBaseAddr */
- 4, /* maskRowBytes */
- { 0, 0, 32, 32 }, /* mbounds */
- // *
- // ********** IconBMap **********
- // *
- // 00000000 /* fill long = 1BaseAddr */
- 4, /* iconBMapRowBytes */
- { 0, 0, 32, 32 }, /* 1bounds */
- // *
- // ********** IconData **********
- // *
- // 00000000 /* fill long = Placeholder for Handle. */
- // *
- // ********** MaskData **********
- // *
- // hex string [$$Word(maskRowBytes) * ($$BitField(Bounds, 32, 16) /*bottom*/ -
- // $$BitField(Bounds, 0, 16) /*top*/ ]
- $"00BFEF80 01BFBFC0 03FFFFE0 0EFFFFF0"
- $"07FFFFF8 0FFFFFF0 0FFFFFF8 1FFFFFF8"
- $"0FFFFFFC 3FFFFFFE 3FFFFFFE 1FFFFFFE"
- $"7FFFFFFE 3FFFFFFC 7FFFFFFE 3FFFFFFE"
- $"7FFFFFFE 1FFFFFFE 0FFFFFFE 1FFFFFFE"
- $"0FFFFFFF 07FFFFF8 01FFFFF0 00FFFFC0"
- $"00FFFEC0 00FFFFF8 01FFFFFF 03FFFFFF"
- $"1FFFFFFE 7FFFFFE0 FFFFFFC0 01FFFF00",
- // *
- // ********** BMapData **********
- // *
- // hex string [$$Word(iconBMapRowBytes) * ($$BitField(Bounds, 32, 16) /*bottom*/ -
- // $$BitField(Bounds, 0, 16) /*top*/ ]
- $"0017C300 00BFAF80 01B7FFC0 06EFB7E0"
- $"03F73AF0 07D40960 05C20330 0FA00230"
- $"07800138 1D8001FC 178000DC 0F8000FC"
- $"3FBA2F6C 1BBDDC88 3B566A4C 190A1D4C"
- $"3C024054 0C8640BC 07742E3C 0F034034"
- $"058FF87A 029BECD0 009C1CA0 0043E080"
- $"0061C280 00400070 0050044E 00C80861"
- $"0783E060 18800040 20C000C0 00600300",
- // *
- // ********** PMapCTab **********
- // *
- 0x0, /* ictSeed */
- 0, /* ictFlags */
- // integer = $$Countof(ColorSpec) - 1 /* ctSize */
- // *
- // ********** startICT **********
- // *
- {
- 0, $FFFF, $FFFF, $FFFF; /* white */
- 1, $FFFF, $B95B, $AD15; /* light flesh */
- 2, $FFFF, $8978, $70E4; /* dark flesh */
- 3, $DD6B, $08C2, $06A2; /* red */
- 4, $7EFF, $41F2, $22FD; /* brown */
- 5, $0000, $0000, $D400; /* blue */
- 6, $0000, $0000, $0000; /* black */
- },
- // *
- // ********** endICT **********
- // *
- // ********** PMapData **********
- // *
- // hex string [$$BitField(pMapRowBytes, 0, 13) *
- // ($$BitField(Bounds, 32, 16) /*bottom*/ -
- // $$BitField(Bounds, 0, 16) /*top*/ ]
- $"00000000 00060666 66000066 00000000"
- $"00000000 60666666 60606666 60000000"
- $"00000006 60660666 66666666 66000000"
- $"00000660 66616666 61661666 66600000"
- $"00000066 66661666 11666161 66660000"
- $"00000666 66161611 11116116 16600000"
- $"00000606 66111161 11111166 11660000"
- $"00006666 61611111 11111161 11660000"
- $"00000666 61111111 11111116 11666000"
- $"00066606 61111111 11111116 66666600"
- $"00060666 61111111 11111111 66166600"
- $"00006666 61111111 11111111 66666600"
- $"00666666 33333131 13333331 16616600"
- $"00066163 41444313 34144413 61116000"
- $"00666163 14141321 34414143 16116600"
- $"00066113 11114321 31144413 16116600"
- $"00666613 11111321 31111113 16160600"
- $"00006611 33333121 13333331 61666600"
- $"00000666 11111211 11111111 11666600"
- $"00006666 11111122 12111111 11660600"
- $"00000606 11112222 22222111 16666060"
- $"00000060 11122122 22212211 66060000"
- $"00000000 11122211 11122211 10600000"
- $"00000000 01111122 22211111 10000000"
- $"00000000 01111112 22111121 10000000"
- $"00000000 02111111 11111211 55550000"
- $"00000000 51121111 11112111 55555550"
- $"00000005 51112111 11121111 55555550"
- $"00005555 11111222 22111111 55555500"
- $"00555555 55555555 55555555 55000000"
- $"05555555 55555555 55555555 50000000"
- $"00000000 55555555 55555550 00000000"
- };
-
- /////////////////////
-
- // Mac SE-&-below-version for the above:
-
- resource 'ICON' (myIconRsrc, "Face", purgeable) {
- $"0017C300 00BFAF80 01B7FFC0 06EFB7E0 03F73AF0 07D40960 05C20330 0FA00230"
- $"07800138 1D8001FC 178000DC 0F8000FC 3FBA2F6C 1BBDDC88 3B566A4C 190A1D4C"
- $"3C024054 0C8640BC 07742E3C 0F034034 058FF87A 029BECD0 009C1CA0 0043E080"
- $"0061C280 00400070 0050044E 00C80861 0783E060 18800040 20C000C0 00600300"
- };
-
- /////////////////////
-
- resource 'SICN' (mySicnRsrc, "IACS", purgeable) {
- {
- $"FFFF"
- $"FFFF"
- $"B311"
- $"AD77"
- $"AD77"
- $"AD77"
- $"AD77"
- $"AD77"
- $"A171"
- $"AD7D"
- $"AD7D"
- $"AD7D"
- $"AD7D"
- $"AD11"
- $"FFFF"
- $"FFFF"
- };
- };
-
- ///////////////////// Balloon Help goodies ... /////////////////////
-
- resource 'hfdr' (kHMHelpID, "Finder help", purgeable) {
-
- HelpMgrVersion,
- hmDefaultOptions,
- 0, /* balloon definition function */
- 0, /* variation code */
- { /* HFdrArrays ... */
- HMPictItem {
- 999 // Picture Resource ID
- // "Ain’t he cute?!*!?\n"
- // " Courtesy of:\n"
- // "I•A•C•S Software",
- };
- };
-
- };
-
- /*--------*/
-
- resource 'hovr' (Help_Window, "Help Window", purgeable) {
-
- HelpMgrVersion,
- hmDefaultOptions,
- 0, // Balloon Definition Function.
- 0, // Balloon Variant.
- HMSkipItem {
- /* NO Balloons for the missing items */
- },
- {
- HMSkipItem { /* use default for title bar */
- },
- HMSkipItem { /* reserved */
- },
- HMStringItem { /* close box */
- "Click here to close this sucker!!!"
- },
- HMSkipItem { /* zoom box */
- },
- HMStringItem { /* active app's inactive window */
- "Click on this hummer to activate it. If this is your "
- "Help Window, you can also click on the Floating Palette "
- "or you can press either <CMD-?> or <Help> to activate it."
- },
- HMSkipItem { /* window belonging to inactive app */
- },
- HMSkipItem { /* outside of modal dialog */
- }
- } /* End of override items */
-
- };
-
- /*--------*/
-
- resource 'hmnu' (kHMHelpMenuID, "my Help Menu item", purgeable) {
-
- HelpMgrVersion,
- hmDefaultOptions,
- 0, /* balloon definition function */
- 0, /* variation code */
- HMSkipItem {
- /* no missing items */
- },
- /* NO Menu Title items for this special case. */
- /* The Help Manager processes Balloons for */
- /* all the standard Help Menu items. */
- { /* my added item */
- HMStringItem {
- "Watch the spiffy fireworks !!!", /* enabled */
- "Item is dimmed.",
- "Item is checked.",
- "" /* Item canNOT be otherwise marked. */
- };
- }; /* End of Menu Title + items */
-
- };
-
- /*--------*/
-
- resource 'STR#' (Help_Window, "Window content help text", purgeable) {
- // These strings form the contents of the Help balloons for all items because
- // there are variations in some of the DITL fields. Therefore, we have a
- // dynamic window, wherein a 'hdlg' has little merit. Note that for each DLOG
- // item, two strings are provided to emulate the first two states normally
- // listed in a 'hdlg' resource. This is done to aid in indexing thru my
- // gDynamicBalloons[] Array. Also note that I do NOT strictly follow the above
- // two states for either the Display_Area or the Message_Area.
-
- {
- /* [ 1] = "Done" Button */
- // highlighted control, or an enabled non-control:
- "Click here or press <CR>, <Enter> or <CMD-period> to close Help Window",
- // dimmed control, or a disabled non-control:
- "",
- /* // active checked control:
- "",
- // multi-part control, e.g., a scroll bar:
- "", */
-
- /* [ 3] = Topics_Area */
- "Click here to select Topic of interest. Scroll list "
- "using the Mouse or the keyboard. Try <Option-Up Arrow>, "
- "<Option-Down Arrow> or ANY letter. If using an Extended "
- "Keyboard, press <Home>, <End>, <Page Up> or <Page Down>.",
- "",
-
- /* [ 5] = Display_Area, with Intro PICTure */
- "Intro Screen or PICTure",
- /* after Intro PICTure */
- "Detailed info about selected Topic, displayed as a PICTure or Text. "
- "If text, scroll using the Mouse or the keyboard <Up & Down Arrows>.",
-
- /* [ 7] = Next_Button */
- "Click here to get next screen or press <CMD-Right Arrow>",
- "Button is disabled because there are no more screens or PICTures",
-
- /* [ 9] = Prev_Button */
- "Click here to get previous screen or press <CMD-Left Arrow>",
- "Button is disabled because this is the first screen or PICTure",
-
- /* [11] = Mast_Head */
- "",
- "Masthead for Topics List",
-
- /* [13] = Message_Area <for type = 'pict'> */
- "Screen number",
- /* <for type = 'text'> */
- "Just text";
- };
- };
-
- /////////////////////
-
- type 'HTBL' {
- integer; /* First_Menu */
- integer; /* Last_Menu */
- integer = $$CountOf(HelpTopic) - 1; /* Num_Of_Topics {Zero-based} */
- array HelpTopic {
- switch {
-
- case pict:
- key unsigned longint = 'PICT';
- integer; /* resource_start */
- integer; /* resource_end */
-
- case text:
- key unsigned longint = 'TEXT';
- start: integer;
- end: integer = $$Word(start[ $$ArrayIndex(HelpTopic) ]); // end = start
-
- }; /* end of switch */
- pstring; /* topic_name */
- align word;
- }; /* end of HelpTopic array */
- };
-
- resource 'HTBL' (HTBL_RSRC, "HELP", purgeable) {
-
- mFile,
- mEdit,
- { /* Number of HelpTopics */
-
- // The strings below are the Topics that appear in the List_Rect.
- // Double-clicking on these Topic names displays the PICT resource
- // or the TEXT resource specified by the preceding ID(s). For a
- // PICT resource, there is a range of IDs. For a TEXT resource,
- // there is one-and-only-one ID
- //
- // NOTE: the "Intro PICT" item is NOT displayed in the scrollable
- // list. This list begins with the second item.
-
- /* [ 0] */
- pict { MAC , MAC }, "Intro PICT";
- /* [ 1] */
- pict { IACS, WAP }, "About my company";
- /* [ 2] */
- text { 110 }, "About John Love ..........";
- /* [ 3] */
- text { 120 }, "Academic Background";
- /* [ 4] */
- text { 130 }, "Other Pertinent Education";
- /* [ 5] */
- text { 140 }, "Professional Societies";
- /* [ 6] */
- text { 150 }, "Snapshot of Experience";
- /* [ 7] */
- text { 160 }, "Computer Programming";
- /* [ 8] */
- text { 170 }, "Systems Program Management";
- /* [ 9] */
- text { 180 }, "Financial Management";
- /* [10] */
- text { 190 }, "Configuration Management";
- /* [11] */
- text { 200 }, "Laser Physics";
- /* [12] */
- text { 210 }, "Operations Research";
- };
- };
-
- /*--------*/
-
- resource 'DLOG' (Help_Window, "Help Window", purgeable) {
-
- {30, 30, 330, 505},
- rDocProc,
- invisible,
- goAway,
- 0x0, /* refCon */
- Help_Window,
- "Pillera's Help System",
- centerMainScreen
-
- };
-
- resource 'DITL' (Help_Window, "Help Window", purgeable) {
- {
- /* [ 1] */
- {260, 352, 280, 412}, Button {enabled, "Done"};
- /* [ 2] */
- { 32, 305, 185, 465}, UserItem {enabled}; /* Topics_Area */
- /* [ 3] */
- { 10, 10, 290, 290}, UserItem {enabled}; /* Display_Area */
- /* [ 4] */
- {225, 405, 245, 465}, Button {enabled, "Next"};
- /* [ 5] */
- {225, 305, 245, 385}, Button {enabled, "Previous"};
- /* [ 6] */
- { 10, 305, 27, 465}, StaticText {disabled, "Select a Help Topic:"};
- /* [ 7] */
- {195, 305, 215, 465}, StaticText {disabled, "Status: Screen 1 of 1"};
- /* [ 8]
- ** Won't use a 'hdlg' resource because our window is partially dynamic.
- ** Instead, FindAndShowBalloons will manipulate Balloons. */
- // { 0, 0, 0, 0}, HelpItem {disabled, HMScanhdlg {Help_Window}};
- };
- };
-
- resource 'dctb' (Help_Window, "Help Window", purgeable) {
- 0x0, // wCSeed
- 0, // wCReserved
- {
- // Text color = color of window's title.
- // Hilite color = color of horizontal lines, close box and
- // grow box in title bar.
- // Color of title bar = color around horizontal lines and
- // the two boxes in the title bar.
- //
- // Howsomever, rDocProc is a special case:
- //
- // a) text color = content color.
- // b) hilite color must ALWAYS be white.
- // c) color of title bar = frame color.
- //
- // Please note that these ColorSpecs for wTextColor,
- // wHiliteColor and wTitleBarColor are commented out because
- // Mommy ROM takes care of the above conversions !!
-
- wContentColor, 65535, 65535, 65535; /* white */
- wFrameColor, 65535, 0, 0; /* red */
- // wTextColor, 65535, 65535, 65535; /* white */
- // wHiliteColor, 65535, 65535, 65535; /* white */
- // wTitleBarColor, 65535, 0, 0; /* red */
- }
- };
-
- resource 'CNTL' (Help_Window, "Help Window", purgeable) {
- { 10, 290-16, 290, 290}, // NOT resized in this case
- 0, // Initial value
- visible,
- 10, // Max value (set by the program)
- 0, // Minimum value
- scrollBarProc,
- 0, // NO refCon.
- "" // no title
- };
-
- resource 'cctb' (Help_Window, "Help Window", purgeable) {
- 0x0,
- 0,
- {
- cFrameColor, 65535, 0, 0;
- cBodyColor, 65535, 65535, 65535;
- cTextColor, 0, 0, 0;
- cElevatorColor, 0, 0, 65535;
- };
- };
-
- /*--------*/
-
- resource 'DLOG' (Help_Error, "Error Message", purgeable) {
-
- {30, 30, 332, 340},
- dBoxProc,
- invisible,
- noGoAway,
- 0x0, /* refCon */
- Help_Error,
- "",
- centerMainScreen
-
- };
-
- resource 'DITL' (Help_Error, "Error Message", purgeable) {
- {
- /* [ 1] */
- {265, 125, 285, 185}, Button {enabled, "OK"};
- /* [ 2] ... for framing the above "OK" Button */
- { 0, 0, 0, 0}, UserItem {disabled};
- /* [ 3] */
- { 75, 22, 107, 54}, Icon {enabled, 2}; // = cautionIcon
- /* [ 4] */
- {187, 22, 204, 288}, StaticText {disabled, ""};
- /* [ 5] */
- {209, 22, 226, 288}, StaticText {disabled, ""};
- /* [ 6] */
- {231, 22, 248, 288}, StaticText {disabled, ""};
- /* [ 7] */
- { 12, 154, 170, 288}, Picture {disabled, MONSTER};
- };
- };
-
- resource 'dctb' (Help_Error, "Help Window", purgeable) {
- 0x0, // wCSeed
- 0, // wCReserved
- {
- wContentColor, 65535, 65535, 65535; /* white */
- wFrameColor, 65535, 0, 0; /* red */
- wTextColor, 0, 0, 65535; /* blue */
- wHiliteColor, 0, 0, 0; /* black */
- wTitleBarColor, 45056, 45056, 45056; /* medium gray */
- };
- };
-
- /////////////////////
-
- resource 'acur' (128, "Rotating Earth", preload, locked) {
- {
- 128,
- 129,
- 130,
- 131,
- 132,
- 133,
- 134 /* End of list */
- }
- };
-
- /*========*/
-
- resource 'CURS' (128, "Earth1", preload, locked) {
- $"07C0 19B0 2C98 763C 7D3C BB12 BE0E BE1E" /* Data (16 X 16) */
- $"9D1E 8C0E 4784 4784 2308 1B30 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" /* Mask (16 X 16) */
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 } /* Hot Spot (point) */
- };
-
- /*========*/
-
- resource 'CURS' (129, "Earth2", preload, locked) {
- $"07C0 1F30 2D98 4ECC 4FA4 8762 87C2 87C2"
- $"83A2 8182 40F4 40F4 2068 1870 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (130, "Earth3", preload, locked) {
- $"07C0 1870 30E8 70F4 50F4 E07E E07E C07A"
- $"803A C81A 5C0C 7C04 2008 1830 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (131, "Earth4", preload, locked) {
- $"07C0 19B0 3F18 7F0C FD0C FE02 FE02 FC02"
- $"A802 8482 51C4 43C4 2008 1C30 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC FFFC FFFE FFFE FFFE"
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (132, "Earth5", preload, locked) {
- $"07C0 1C70 3FD8 7FFC 7FD4 9FE2 EFE2 F6C2"
- $"F282 E04A 611C 503C 2008 1830 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (133, "Earth6", preload, locked) {
- $"07C0 1F30 3FF8 7FFC 7FFE 91FE 8EFE 9F6E"
- $"9F2A 8E02 4E14 4D04 2008 1830 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (134, "Earth7", preload, locked) {
- $"07C0 1AB0 29F8 63FC 53FC B11E E0CE E1F2"
- $"D1F2 C0E2 78E4 78D4 3008 1830 07C0 0000",
- //
- $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
- $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0 0000",
- //
- { 0, 0 }
- };
-
- /////////////////////
-
- resource 'acur' (129, "DogCow", preload, locked) {
- {
- 144,
- 145,
- 146,
- 147,
- 148,
- 149,
- 150,
- 151
- }
- };
-
- /*========*/
-
- resource 'CURS' (144, "DogCow1", preload, locked) {
- $"0000 0000 0000 1600 3E01 5403 C305 F3FD"
- $"08FA 0C72 0C02 0DF2 0A0A 0A0A 0A0A 1C1E",
- //
- $"0000 0000 0000 1600 3E01 7C03 FF07 FFFF"
- $"0FFE 0FFE 0FFE 0FFE 0E0E 0E0E 0E0E 1C1E",
- //
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (145, "DogCow2", preload, locked) {
- $"0000 FF80 4B00 E3C0 1180 09C0 0CE0 1CF0"
- $"207F 2C02 2A3C 4920 30A0 0090 0050 0060",
- //
- $"0000 FF80 7F00 FFC0 1F80 0FC0 0FE0 1FF0"
- $"3FFF 3FFE 3BFC 79E0 30E0 00F0 0070 0060",
- //
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (146, "DogCow3", preload, locked) {
- $"3030 2838 2424 13AC 0BC6 040C 0236 0236"
- $"02E0 02E0 0EE0 1060 2620 2990 2850 3038",
- //
- $"3030 3838 3C3C 1FBC 0FFE 07FC 03F6 03F6"
- $"03E0 03E0 0FE0 1FE0 3FE0 39F0 3870 3038",
- //
-
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (147, "DogCow4", preload, locked) {
- $"000A 080E 170A 1092 0EE6 02C2 040E 083E"
- $"30FA C1E8 9DC0 6580 0500 0500 0300 0100",
- //
- $"000A 080E 1F0E 1F9E 0FFE 03FE 07FE 0FFE"
- $"3FFA FFE8 FFC0 6780 0700 0700 0300 0100",
- //
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (148, "DogCow5", preload, locked) {
- $"0000 06C0 0AA0 1290 1458 17D8 2018 2718"
- $"4F18 9FCF E0C3 802A 00FC 00D0 0000 0000",
- //
- $"0000 06C0 0EE0 1EF0 1C78 1FF8 3FF8 3FF8"
- $"3FF8 FFFF E0FF 803E 00FC 00D0 0000 0000",
- //
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (149, "DogCow6", preload, locked) {
- $"0600 0A00 0900 050C 0492 3C54 4034 FE04"
- $"0F38 0730 0390 0188 03C7 00D2 01FF 0000",
- //
- $"0600 0E00 0F00 070C 079E 3FDC 7FFC FFFC"
- $"0FF8 07F0 03F0 01F8 03FF 00FE 01FF 0000",
- //
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (150, "DogCow7", preload, locked) {
- $"0E06 050A 04CA 0232 0304 03B8 03A0 03A0"
- $"3620 3620 1810 31E8 1AE4 1212 0E0A 0606",
- //
- $"0E06 070E 07CE 03FE 03FC 03F8 03E0 03E0"
- $"37E0 37E0 1FF0 3FF8 1EFC 1E1E 0E0E 0606",
- //
- { 6, 0 }
- };
-
- /*========*/
-
- resource 'CURS' (151, "DogCow8", preload, locked) {
- $"0080 00C0 00A0 00A0 01A6 03B9 0F83 3F8C"
- $"7C10 7020 4340 6770 4908 50E8 7010 5000",
- //
- $"0080 00C0 00E0 00E0 01E6 03FF 0FFF 3FFC"
- $"7FF0 7FE0 7FC0 7FF0 79F8 70F8 7010 5000",
- //
- { 6, 0 }
- };
-